import '@/utils/request'
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

//收发料锁

// 获取本机构及其以下机构(懒加载)
const getOrgName = params => {
    return httpGet({
        url: '/hr/org/getLazyChildrenOrg',
        params
    })
}
// 根据条件分页查询收发料锁-机构信息
const getreceivingAndIssuingLock = params => {
    return httpPost({
        url: '/material/receivingAndIssuingLock/listByEntity',
        params
    })
}
// 新增收发料锁-机构信息
const AddreceivingAndIssuingLock = params => {
    return httpPost({
        url: '/material/receivingAndIssuingLock/create',
        params
    })
}

// 根据收发料锁-机构信息id删除收发料锁-机构信息
const delreceivingAndIssuingLock = params => {
    return httpGet({
        url: '/material/receivingAndIssuingLock/delete',
        params
    })
}
// 启用  停用
const startBlock = params => {
    return httpPost({
        url: '/material/receivingAndIssuingLock/update',
        params
    })
}
// 保存，更新或删除收料锁物资类别
const createOrUpdateReceivingLock = params => {
    return httpPost({
        url: '/material/receivingAndIssuingLock/createOrUpdateReceivingLock',
        params
    })
}
// 保存，更新或删除发料锁物资类别
const createOrUpdateIssuanceLock = params => {
    return httpPost({
        url: '/material/receivingAndIssuingLock/createOrUpdateIssuanceLock',
        params
    })
}

export {
    getOrgName,
    getreceivingAndIssuingLock,
    AddreceivingAndIssuingLock,
    delreceivingAndIssuingLock,
    startBlock,
    createOrUpdateReceivingLock,
    createOrUpdateIssuanceLock

}
